package com.hjp.designmode.builder;

/**
 * @Description: 具体建造者(服务员)
 * 建造者模式意图:将一个复杂的构建与其表示相分离，使得同样的构建过程可以创建不同的表示
 * @Author: huangjp6
 * @Date:
 */
public class ConcreteBuilder extends Builder {
    private Product product;

    public ConcreteBuilder() {
        product = new Product();
    }

    @Override
    public Product build() {
        return product;
    }

    @Override
    public Builder bulidA(String mes) {
        product.setBuildA(mes);
        return this;
    }

    @Override
    public Builder bulidB(String mes) {
        product.setBuildB(mes);
        return this;
    }

    @Override
    public Builder bulidC(String mes) {
        product.setBuildC(mes);
        return this;
    }

    @Override
    public Builder bulidD(String mes) {
        product.setBuildD(mes);
        return this;
    }
}
